public class text {
    public static void main(String[] args) {
        ren ren1 = new ren("王博122222");
        ren1.setAge(1000);
        System.out.println(ren1.inshow());
        System.out.println(ren1.getAge());
    }
}
class ren{
    private int age;
    public String name;

    public ren(String name) {
        if(name.length()<4) {
            this.name = name;
        }
        else{
            System.out.println("输入错误");
            name="无名氏";
        }
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age>=1&&age<=120) {
            this.age = age;
        }
        else{
            System.out.println("你设置年龄错误");
            this.age=18;
        }
    }
    public String  inshow(){
        return name+"\t"+age;
    }
}